package com.repository;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import com.entity.UserEntity;

@Repository
@Transactional
public interface UserEntityRepository extends JpaRepository<UserEntity, String> {

    List<UserEntity> findByUserNameOrderByCreateTimeDesc(String userName);

    long deleteByUserName(String userName);

    boolean existsByUserName(String userName);

}
